﻿using IMeiWei.Model;
using IMeiWeiWebService.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace IMeiWeiWebService.Extensions
{
    public static class businesstypeclassoneExtension
    {
        public static Cuisine ToCuisine(this businesstypeclassone record, List<SubCuisines> subCuisines)
        {
            return new Cuisine()
            {
                CuisineId = record.Id,
                CuisineName = record.ClassOneItem,
                SubCuisines = subCuisines,
            };
        }

        public static Item ToItem(this businesstypeclassone record, List<SubItem> subItems)
        {
            return new Item()
            {
                ItemId = record.Id,
                ItemName = record.ClassOneItem,
                SubItems = subItems,
            };
        }
    }
}